import React from 'react'
import { ActivityIndicator, Result, Tools, Icon, Toast } from 'weaver-mobile';

const getLabel = Tools.getLabel;

/* 统一增加参数 */
export const PARAMS = {
  // _ec_device: 'mobile_ec',
  _ec_ismobile: 'true',
}

/* Loading 页面 */
export const renderLoading = (
  <div  className='blog-loading'>
    <div className='blog-loading-content'>
      <ActivityIndicator />
      <div style={{ marginTop: 8 }}>loading...</div>
      {/* {
        Toast.loading('加载中...', 1)
      } */}
    </div>
  </div>
);

/* 暂无数据 页面 */
export const renderNoData = (
  <div className='blog-noData'>
    <Result
      img={<Icon type="no-data" />}
      message={getLabel(83553, '暂无数据')}
    />
  </div>
);


/* Loading 页面 */
export const renderLoadingDef = (
  <div style={{height:window.screen.availHeight/2}} className='blog-loading'>
    <div className='blog-loading-content'>
      <ActivityIndicator />
      <div style={{ marginTop: 8 }}>loading...</div>
      {/* {
        Toast.loading('加载中...', 1)
      } */}
    </div>
  </div>
);

/* 暂无数据 页面 */
export const renderNoDataDef = (
  
  <div style={{height:window.screen.availHeight/2}} className='blog-noData'>
    <Result
      img={<Icon type="no-data" />}
      message={getLabel(83553, '暂无数据')}
    />
  </div>
);

export const renderIcon = {
  blog_submit_ok:{icon:'check-circle-o', text:getLabel(15176,'已提交'), color:'#2bb028',textFunc:() => getLabel(15176,'已提交')},
  blog_submit_no:{icon:'blog-weitijiao', text:getLabel(32555,'未提交'), color:'#505050',textFunc:() => getLabel(32555,'未提交')},
  mood_happy:{icon:'blog-gaoxing', text:getLabel(26917,'高兴'), color:'#2fbbff',textFunc:() => getLabel(26917,'高兴')},
  mood_unhappy:{icon:'blog-bugaoxing', text:getLabel(26918,'不高兴'), color:'#ff2a2a',textFunc:() => getLabel(26918,'不高兴')},
  sign_absent:{icon:'cross-circle', text:getLabel(20085,'旷工'), color:'#7326ff',textFunc:() => getLabel(20085,'旷工')},
  sing_late:{icon:'blog-chidao', text:getLabel(20081,'迟到'), color:'#ff7800',textFunc:() => getLabel(20081,'迟到')},
  sign_ok:{icon:'blog-zhengchang', text:getLabel(225,'正常'), color:'#2cc7a4',textFunc:() => getLabel(225,'正常')},
    delay_submit:{icon:"check-circle-o", text:getLabel(523636 ,"已补交"), color:"#F5B400",textFunc:() => getLabel(523636,"已补交")},
  '':{icon:'', text:'', color:''},
}